<?php
//Exportar datos de php a Excel
//header("Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
//header("Expires: 0");
//header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
//header("content-disposition: attachment;filename=Reportes.xls");
//    header('Content-type: application/vnd.ms-excel');
//    header("Content-Disposition: attachment; filename=Reportes");
//    header("Pragma: no-cache");
//    header("Expires: 0");
?>
<html>
    <head>
        <meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ />
        <title>excel CrediPhonet</title>
    </head>
    <body>

        <TABLE BORDER=1 align="center" CELLPADDING=1 CELLSPACING=1>
            <TR>
                <TD>Apellido</TD>
                <TD>Nombre</TD>
                <TD>Dni</TD>
                <TD>Domicilio</TD>

                <TD>Mail</TD>
                <TD>Domicilio Laboral</TD>
            </TR>
            <?php //$cliente = new Doctrine_Model_Entities_Persona;
            $dato_laboral = new Doctrine_Model_Entities_DatosLaboral
            ?>
            <?php foreach ($this->clientes as $cliente) : ?>
                <TR>
                    <td><?php echo $cliente->getApellido() ?></td>
                    <td><?php echo $cliente->getNombres() ?></td>
                    <td><?php echo $cliente->getNroDocumento() ?></td>
                    <td><?php echo $cliente->getDireccion()->getDireccion() ?></td>

                    <td><?php echo $cliente->getMail() ?></td>
                    <td><?php $auxiliar=  $cliente->getDatosLaborales();
                                $datoLaboral = $auxiliar[0];
                                echo $datoLaboral->getDireccion()->getDireccion();?></td>
                </TR>
            <?php endforeach; ?>

        </table>
    </body>
</html>